package st.business.tepth.business.user.busnumber.preholder.repair;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import st.business.tepth.R;
import st.business.tepth.business.bean.PreWorkInfoBean;

/**
 * @author zhangyu
 * @date 2019/3/26
 */
public class PreRepairAdapter extends BaseQuickAdapter<PreWorkInfoBean.Info,
        BaseViewHolder> {

    public PreRepairAdapter(int layoutResId, @Nullable List<PreWorkInfoBean.Info> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PreWorkInfoBean.Info info) {
        helper.setText(R.id.cb_classification, info.getVehicle_series_name());
        helper.setText(R.id.tv_trouble, info.getPhenomenon_name());
        helper.setText(R.id.tv_warn_record, info.getAlarm_name() == null ? "无" :
                info.getAlarm_name());
        helper.setText(R.id.tv_work_content, info.getSuggestion() == null ? "无" :
                info.getSuggestion());
    }
}
